﻿namespace Oddo.Concept.Crm.Common.Interfaces
{
    using System;
    using System.Linq;
    using System.Linq.Expressions;
    using Oddo.Concept.Crm.Common.Models;

    public interface IBusiness
    {
    }

    public interface IBusiness<T>
        where T : IBusinessModel
    {
        IQueryable<T> Query();
        IQueryable<T> Query(Expression<Func<T, bool>> predicate);
    }

    public abstract class BusinessBase
    {
    }

    public abstract class BusinessBase<T> : BusinessBase, IBusiness<T>
        where T : IBusinessModel
    {
        public abstract IQueryable<T> Query();
        public abstract IQueryable<T> Query(Expression<Func<T, bool>> predicate);
    }
}